import java.util.Scanner;

public class PrimeNumberMethod {
    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
        int range=input.nextInt();
        System.out.println(primeNumber(range));
    }
    public static boolean isPrime(int number){
        for (int divisor=2;divisor<=number/2;divisor++){
            if (number%divisor==0) return false;
        }
        return true;
    }
    public static int primeNumber(int maxNumber){
        int primeNum=0;
        for (int i=2;i<maxNumber;i++){
            if (isPrime(i)) primeNum++;
        }
        return primeNum;
    }
}
